import request, { ApiResponse } from '@/utils/service/request'
import config from '@/config'
import { QiNiuTokenRequest } from './model/qiniuModel'

export enum QiNiuApi {
  GET_TOKEN = '/common/qiniu/token',
}

export function fetchQiNiuToken(params: QiNiuTokenRequest) {
  return request.get<ApiResponse<string>>(QiNiuApi.GET_TOKEN, {
    baseURL: config.FILE_SERVER_BESE_URL,
    params,
  })
}
